import {get, post} from "@/utils/apiUtils";

export const useAssetTypeApi = () => {
    return {
        list: (data:any) => {
            return get("/assetType/list", data)
        },
        save: (data:any) => post("/assetType/save", data),
        auth: () => get("/assetType/auth", null),
        id: (data:any) => get("/assetType/byId", data)
    }
}

export const useAssetTypeProperty = () => {
    return {
        list: (id:any) =>{
            return get("/assetTypeProperty/list", {"assetTypeId": id})
        },
        save: (data:any) =>{
            return post("/assetTypeProperty/save", data)
        },
        del: (id: number) =>{
            return get("/assetTypeProperty/delete", {"propertyId": id})
        }
    }
}